package org.example.controller;

import org.example.server.MyWebSocket;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class MyWebSocketController {
 @Autowired
 MyWebSocket myWebSocket;

 @GetMapping("/sendSocket/{message}")
 public void sendSocket(@PathVariable String message, String[] userIds) {
  myWebSocket.sendMoreMessage(userIds, message);
  System.out.println("send");
 }
}